<template>
     <div class="loading" v-if="isLoad" @click="Loading">
      <div class="background">
          <img src="../image/loading.gif" alt="">
      </div>
    </div>
</template>

<script setup>
import { storeToRefs } from 'pinia';
import {useMainstore}  from '../../stores/modules/mainStores'
const mainStore = useMainstore();
const { isLoad } = storeToRefs(mainStore);
// console.log("mainstore", mainStore);

//设置点击就取消页面
function Loading()
{
    isLoad.value = false;
}

</script>

<style lang="less" scoped>
.loading
{
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
  opacity: (0.5);
  z-index: 999;

}
</style>